package com.systop.ltbook.sms.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.systop.common.modules.security.user.model.User;
import com.systop.core.model.BaseModel;

/**
 * 发送短信实体
 * 
 * @author DU
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "sms_sends")
public class SmsSend extends BaseModel {

	private Integer id;

	private User sender;

	/**
	 * 接收手机号码
	 */
	private String mobileNum;

	/**
	 * 接收人姓名
	 */
	private String receiverName;

	/**
	 * 系统创建时间
	 */
	private Date createTime;

	/**
	 * 发送时间
	 */
	private Date sendTime;

	/**
	 * 短信内容
	 */
	private String content;

	/**
	 * 是否最新
	 */
	private String isNew;
	
	/**
	 * 分几条发送
	 */
	private Integer smsNums;

	/**
	 * 短信是否被接收
	 */
	private String isReceive;

	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 代理服务器Id
	 */
	private Integer masid;

	@Id
	@GeneratedValue(generator = "hibseq")
	@GenericGenerator(name = "hibseq", strategy = "hilo")
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getMobileNum() {
		return mobileNum;
	}

	public void setMobileNum(String mobileNum) {
		this.mobileNum = mobileNum;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getIsNew() {
		return isNew;
	}

	public void setIsNew(String isNew) {
		this.isNew = isNew;
	}

	public String getIsReceive() {
		return isReceive;
	}

	public void setIsReceive(String isReceive) {
		this.isReceive = isReceive;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Integer getMasid() {
		return masid;
	}

	public void setMasid(Integer masid) {
		this.masid = masid;
	}

	@ManyToOne(cascade={}, fetch=FetchType.LAZY)
	@JoinColumn(name = "sender_id")
	public User getSender() {
		return sender;
	}

	public void setSender(User sender) {
		this.sender = sender;
	}

	@Column(name="receiver_name")
	public String getReceiverName() {
		return receiverName;
	}

	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}

	@Column(name="sms_nums")
	public Integer getSmsNums() {
  	return smsNums;
  }

	public void setSmsNums(Integer smsNums) {
  	this.smsNums = smsNums;
  }

}
